﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace Sinacor.Infra.UI.Common
{
    public interface IModelCollection : IModelCollection<BaseModel>
    {
    }

    public interface IModelCollection<T> : IObservableObject
        where T : BaseModel
    {
        bool EnableStateControl { get; set; }
        ModelCollection<T> GetDeleted();
        ModelCollection<T> GetInserted();
        ModelCollection<T> GetUpdated();
        ModelCollection<T> GetChanged();
        T GetLastChanged();
        bool HasChanges { get; }
        bool Save(int[] indexs);
        bool Save(int index);
        bool SaveAll();
        bool Undo(int[] indexs);
        bool Undo(int index);
        bool UndoAll();
        bool UndoLast();
    }
}
